package kordegi.forumsystem.entity;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @author kordegi
 * @date 2022.05.01 15:17
 * @Description
 */

@Data
public class User {
    private Long id;

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "密码不能为空")
    private String password;

    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    private String phonenumber;

    private Integer status;

    private LocalDateTime created;

    private LocalDateTime lastLogin;
}
